<template>
  <div class="flex-center font12">
    <!--    <span class="label">当前位置：</span>-->
    <el-breadcrumb :separator-icon="ArrowRight" class="font12">
      <transition-group name="breadcrumb">
        <el-breadcrumb-item v-for="(item, index) in list" :key="index">{{ item }}</el-breadcrumb-item>
      </transition-group>
    </el-breadcrumb>
  </div>
</template>

<script setup name="PageBreadcrumb">
import { ArrowRight } from '@element-plus/icons-vue'

defineProps({
  list: {
    type: Array,
    default() {
      return []
    }
  }
})
</script>

<style scoped lang="scss">
.label {
  color: #606366;
}
.el-breadcrumb {
  display: flex !important;
  align-items: center;
  margin-left: 0 !important;
  &::v-deep(.el-breadcrumb__item) {
    display: flex !important;
    align-items: center;
    .el-breadcrumb__inner {
      color: #333 !important;
    }
  }
  &::v-deep(.el-breadcrumb__separator) {
    line-height: 12px;
    color: #333 !important;
    margin: 0 2px;
  }
}
// 面包屑动画
.breadcrumb-enter-active {
  transition: transform 0.3s, opacity 0.3s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(30px) skewX(-50deg);
}
</style>
